<?php
require_once('../includes/DB.class.php');
require_once('../includes/SmartyManager.class.php');
require_once('../includes/Filter.class.php');
require_once('../includes/functions.inc.php');
require_once('../includes/SpecialMainStateAccount.class.php');

	$filename = $_GET['filename'];

	$account = new SpecialMainStateAccountant($filename);
	$account->execute();

	$data = array(
				'材料代码' 	=> 	$account->getMaterialCode(),
				'批次' 		=> 	$account->getSequenceNumber(),
				'生产厂家' 		=> 	$account->getManufactory(),
				'船级' 		=> 	$account->getAuthenticationMark(),
				'材质' 		=> 	$account->getSteelNumber(),
				'厚' 		=> 	$account->getSize1(),
				'宽' 		=> 	$account->getSize2(),
				'长' 		=> 	$account->getSize3(),
				'订货清单数量'	=> $account->getMain3AllocatedCount(),
				'材料代码数量'	=>	$account->getMain3Count(),
				'订货清单总数量'	=>	$account->getMain3SumCount(),
				'质量证书分配数量'	=> $account->getMainAllocatedCount(),
				'批号数量'		=> $account->getMainCount(),
				'质量证书号数量'	=> $account->getMainCertificationCount(),
				'质量证书号总数量'	=>	$account->getMainSumCount(),
				'单重'		=>	$account->getUnitWeight(),
				'订单号'		=>	$account->getOrderNumber(),
				'订单子项号'		=>	$account->getOrderSubitemNumber(),
				'受订单价'		=>	$account->getUnitPrice(),
				'购单号'	=>  $account->getPurchaseNumber(),
				'备注'	=>  $account->getRemark(),
				'产品质量证明书号'	=> $account->getCertificationNumber(),
				'批号'	=> $account->getSampleBatch(),
				'产品质量证明书编号'	=> $account->getCertificationCodification(),
				'物料号'	=> $account->getMaterialNumber(),
				'发货日期'	=> $account->getShipmentDate(),
				'合同月份'	=> $account->getMonth(),
				'车号'	=> $account->getVehicleNumber(),
				'销售产家'	=> $account->getConsignee()
		);
		
	$filename = pathinfo($filename, PATHINFO_FILENAME).'总表物流-'.date('YmdHis').'.xls';
	generateHttpExcelByCols($data,$filename);
?>